/* Error handling: Takes a message, outputs it and closes the application. */

#include <stdio.h>
#include <stdlib.h>

void log_print_usage_and_exit (const char* argv0, int exit_status)
{
	fprintf (stderr,
		"Usage: %s [OPTION] [SERVER ADDRESS] [PLAYER NAME]\n"
		"Options:\n"
		"  -h, --host       Start in host mode. Requires player name.\n"
		"  -c, --client     Start in client mode. Requires\n"
		"                   server address and player name.\n"
		"  -d, --daemon     Just start the server\n"
		"  -r, --autoready  Automatically set ready in the lobby, requires -c.\n"
		"  --help           Print this message\n",
		argv0);
	exit (exit_status);
}
